<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="generator" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<link href="css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print" />
<link href="css/print.css" rel="stylesheet" type="text/css"  media="print" />
<link rel="stylesheet" type="text/css" href="css/css.css" />
<script src="js/jquery-1.10.1.min.js"></script>
<script src="js/side.js" type="text/javascript"></script>
<script type="text/javascript">
	function addBook(){
		window.location.href="http://localhost:8080/bookadd";
	}

</script>
</head>

<body>
<!-- MainForm -->
<div id="MainForm">
<div class="form_boxA">
<h2>课程列表</h2>
		<div class="conform">
			<div class="cfD" style="margin-bottom: 15px;">
				<!-- <input class="userinput" type="text" placeholder="输入用户名" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
				<input class="userinput vpr" type="text" placeholder="输入用户密码" /> -->
				<button class="userbtn" onclick="addBook()" style="width: 80px;height: 30px;padding-bottom: 0px;border-bottom-width: 10px;">添加</button>
			</div>
		</div>
<table cellpadding="0" cellspacing="0">
<tr class="bgcD">
	<th>序号</th>
	<th>书名</th>
	<th>编号</th> 
	<th>借阅人</th>
	<th>借阅时间</th>
	<th>借阅次数</th>
	<th>还书人</th>
	<th>还书时间</th>
	<th>状态</th>
	<th>操作</th>
</tr>
<tr class="bgcA" th:each="book,bookStat:${books}">
							<td th:text="${bookStat.count}">1</td>
							<td th:text="${book.book_name}">安徒生童话</td>
							<td th:text="${book.book_code}">TS01</td>
							<td th:text="${book.borrow_name}">小林</td>
							<td th:text="${book.borrow_time}">2018-5-13</td>
							<td th:text="${book.borrow_num}">5</td>
							<td th:text="${book.give_name}">英语</td>
							<td th:text="${book.give_time}">2019-5-13</td>
							<td >
								<span th:if="${book.state=='1'}">待借阅</span>
								<span th:if="${book.state=='2'}">已借阅</span>
							</td>
							<td><a th:href="@{/bookedit(bookId=${book.id})}"><img class="operation"
									src="img/update.png" /></a> <a th:href="@{/bookDelete(bookId=${book.id})}" ><img class="operation"
								src="img/delete.png" /></a></td>
						</tr>
</table>
</div>
</div>
<!-- /MainForm -->

</body>
</html>